-- GENERATED SPELL FOR [Painmistress Gabrissa] --


function spell0_21309(pUnit, Event) --@Curse of Pain,n/a--
pUnit:FullCastSpellOnTarget(38048,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21309', 0, 1)
end

function spell1_21309(pUnit, Event) --@Subservience,Self--
pUnit:FullCastSpellOnTarget(38169,pUnit)
pUnit:RegisterEvent('Sorts_21309', 5279, 1)
end

function Sorts_21309(pUnit, Event)
local choix_sorts_21309 = math.random(0, 1)
if choix_sorts_21309 == 0 then
pUnit:RegisterEvent('spell0_21309', 1, 1)
end
if choix_sorts_21309 == 1 then
pUnit:RegisterEvent('spell1_21309', 1, 1)
end
end

function mob21309_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21309', math.random(1500, 3000), 1)
end

function mob21309_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21309_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21309_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21309, 1, 'mob21309_Action')
RegisterUnitEvent(21309, 2, 'mob21309_Leave')
RegisterUnitEvent(21309, 3, 'mob21309_Kill')
RegisterUnitEvent(21309, 4, 'mob21309_Die')
